<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category 2022_04_17_162600_create_stock_articles_table.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/4/17  16:27
 * +--------------------------------------------------------+
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStockArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('stock_articles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('标题');
            $table->string('type', 32);
            $table->longText('content');
            $table->integer('subjectId');
            $table->string('summary')->nullable();
            $table->integer('readingSum')->nullable();
            $table->integer('commentSum')->nullable();
            $table->string('cover', 100)->nullable();
            $table->timestamp('upTime')->nullable();
            $table->integer('isOpen')->nullable();
            $table->integer('openStick')->nullable();
            $table->string('zlAvatarUrl', 100)->nullable();
            $table->string('zlName', 64)->nullable();
            $table->integer('zlSubscribeType')->nullable();
            $table->integer('zlType')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('stock_articles');
    }
}

